#ifndef Keyboard_h
#define Keyboard_h

#include <dinput.h>

class Keyboard
{
public:
	
	~Keyboard();
	
	static Keyboard *GetInstance();
	
	bool Initialize(HWND hWnd, HINSTANCE hInstance);
	void GetDeviceState();
	int IsKeyDown(int KeyCode);

	//Buffered keyboard data
	DIDEVICEOBJECTDATA KeyEvents[1024];
	LPDIRECTINPUTDEVICE8 dInputDevice;	// The keyboard device 
	bool Acquire();
private:
	Keyboard();
	static Keyboard *_kb;
	LPDIRECTINPUT8 dInput;// The DirectInput object         
	BYTE KeyStates[256];// DirectInput keyboard state buffer 
};

#endif